<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>模块化引入</title>
</head>
<script type="module">
    //1.通用的导入方式
    //引入m1.js模块内容
    import * as m1 from './js/m1.js'
    console.log(m1)
    //引入m2.js模块内容
    import * as m2 from './js/m2.js'
    console.log(m2)

    //2.简写形式(默认暴露可以)
    //引入m3.js模块内容  
    import m3 from './js/m3.js'
    console.log(m3)
    m3.change()

    //3.解构赋值的方式
    import {school,teach} from './js/m1.js'
    import {school as coco,test} from './js/m2.js'
    import {default as w} from './js/m3.js'
    console.log(school)
    console.log(teach)
    console.log(coco)
</script>
<!-- <script src="dist/bundle.js"></script> -->
</html>